<?php

// +----------------------------------------------------------------------
// | POS机回调
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 微尘 <yicmf@qq.com>
// +----------------------------------------------------------------------

namespace app\controller\api\notify;

class Pos extends Common
{


    /**
     * 机具绑定回调
     */
    public function bind()
    {
        $data = $this->request->param();
        file_put_contents('bind.txt', '机具绑定 :' . json_encode($data) . "\r\n\r\n", FILE_APPEND);
        return jsonp(["ret_code"=>"00","ret_msg"=>"SUCCESS"]);
    }
    /**
     * 押金缴纳通知
     */
    public function deposit()
    {
        $data = $this->request->param();
        file_put_contents('depositNotify.txt', '押金缴纳 :' . json_encode($data) . "\r\n\r\n", FILE_APPEND);
        return jsonp(["ret_code"=>"00","ret_msg"=>"SUCCESS"]);
    }
    /**
     * 会员购买通知
     */
    public function member()
    {
        $data = $this->request->param();
        file_put_contents('member.txt', '会员购买 :' . json_encode($data) . "\r\n\r\n", FILE_APPEND);
        return jsonp(["ret_code"=>"00","ret_msg"=>"SUCCESS"]);
    }
    /**
     * 交易流水通知
     */
    public function trade()
    {
        $data = $this->request->param();
        file_put_contents('transfer.txt', '交易流水 :' . json_encode($data) . "\r\n\r\n", FILE_APPEND);
        return jsonp(["ret_code"=>"00","ret_msg"=>"SUCCESS"]);
    }



}
